home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / FindChange < prev    next >
Encoding:
Text File  |  1990-09-14  |  1.2 KB  |  45 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        FindChange
  3. #
  4. #    Contains:    script to find an old change in a window
  5. #
  6. #    Usage:        FindChange window version commentFile
  7. #
  8. #                    0        found the change
  9. #                    1        did not find the change
  10. #
  11. #                FindChange extracts a change from the window into the file,
  12. #                commentFile. The change is found by looking for the Change History
  13. #                text. The change must be marked with the version.
  14. #                The script leaves the entire change selected.
  15. #
  16. #    Written by:    Darin Adler
  17. #
  18. #    Copyright:    © 1989 by Apple Computer, Inc., all rights reserved.
  19. #
  20. #    Change History (most recent first):
  21. #
  22. #         <4>      1/3/90    dba        get rid of + handling here; makes it work better with
  23. #                                    ModifyReadOnly
  24. #         <3>    12/18/89    dba        fix bug with FindStatus
  25. #         <2>    12/11/89    dba        fixed to handle + sybols
  26. #                12/11/89    dba        new today (made from GetLastChange)
  27. #
  28. #    To Do:
  29. #
  30.  
  31. Set Exit 0
  32.  
  33. Set Window "{1}"    # find change in this window
  34.  
  35. # find a change line with the right format
  36.  
  37. Find • "{Window}"
  38. Find /•(?«0,1»)[ ∂t]+<"{2}">[ ∂t]+[0-9∂/]+∂t[¬ ∂t]+∂t∂t/Δ:/≈(∂n?«0,1»∂t∂t∂t∂t∂t≈)*∞/ "{Window}"
  39. Set FindStatus {Status}
  40. If {FindStatus} == 0
  41.     UnwrapCommentText < "{Window}.§" > "{3}"
  42.     Find §:\•\:/∂n/ "{Window}"
  43. End
  44. Exit {FindStatus}
  45.